package com.my.spring.controller;

import com.my.spring.Service.ITestCustomNameService;
import com.my.spring.Service.ITestService;
import com.my.spring.annotation.WAutowired;
import com.my.spring.annotation.WController;
import com.my.spring.annotation.WRequestMapping;
import com.my.spring.annotation.WRequestParam;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created by lenovo on 2018/10/31.
 */

@WController
public class Test2Controller {


    @WAutowired("wTestCustomNameService")
    private ITestCustomNameService testCustomNameService;


    @WRequestMapping(value = "/query.jhtml")
    public void query(@WRequestParam("id") Integer id , @WRequestParam("name") String name, HttpServletResponse response, HttpServletRequest request) {
        try {
            response.getWriter().write("传入参数Id:" + id + " name:" + name);
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
